<?
include ('../../config/config.php');
/*$page = (int) (!isset($_GET["page"]) ? 1 : $_GET["page"]);
$limit = 3;
$startpoint = ($page * $limit) - $limit;*/
	$tim = $_GET['id'];
	
	if(!$_GET['tipe']){
	$q = mysql_query("SELECT p.NAMA_PEKERJAAN AS kerja, p.ID_PEKERJAAN AS id, b.NAMA AS nama, p.DUE_PEKERJAAN AS due, s.STATUS_PEKERJAAN as status, p.KOMENTAR as komen FROM biodata as b INNER JOIN pekerjaan as p ON b.NIP=p.NIP INNER JOIN status_pekerjaan as s ON p.ID_STATUS_PEKERJAAN = s.ID_STATUS_PEKERJAAN WHERE b.ID_TEAM='".$tim."' ORDER BY p.DUE_PEKERJAAN");
	}else{
	$tp = $_GET['tipe'];
	$q = mysql_query("SELECT p.NAMA_PEKERJAAN AS kerja, p.ID_PEKERJAAN AS id, b.NAMA AS nama, p.DUE_PEKERJAAN AS due, s.STATUS_PEKERJAAN as status, p.KOMENTAR as komen FROM biodata as b INNER JOIN pekerjaan as p ON b.NIP=p.NIP INNER JOIN status_pekerjaan as s ON p.ID_STATUS_PEKERJAAN = s.ID_STATUS_PEKERJAAN WHERE b.ID_TEAM=$tim AND s.ID_STATUS_PEKERJAAN=$tp ORDER BY p.DUE_PEKERJAAN");
	}

//var_dump($_POST);
//include($_SERVER['DOCUMENT_ROOT'].'/mpd/view/spm/reviewdetail.php');
//$q = mysql_query("SELECT p.NAMA_PEKERJAAN AS kerja, b.NAMA AS nama FROM biodata as b INNER JOIN pekerjaan as p ON b.NIP=p.NIP WHERE b.NIP='".$nip."'");
//$q = mysql_query("SELECT p.NAMA_PEKERJAAN AS kerja, b.NAMA AS nama FROM biodata as b INNER JOIN pekerjaan as p ON b.NIP=p.NIP WHERE b.NIP='".$nip."' AND p.ID_STATUS_PEKERJAAN='".$tp."'");
//$q2 = mysql_query("SELECT p.NAMA_PEKERJAAN AS kerja, b.NAMA AS nama FROM biodata as b INNER JOIN pekerjaan as p ON b.NIP=p.NIP WHERE b.NIP='".$nip."' AND p.ID_STATUS_PEKERJAAN=2");
//$q3 = mysql_query("SELECT p.NAMA_PEKERJAAN AS kerja, b.NAMA AS nama FROM biodata as b INNER JOIN pekerjaan as p ON b.NIP=p.NIP WHERE b.NIP='".$nip."' AND p.ID_STATUS_PEKERJAAN=3");	
?>